package com.ypx;


import lombok.AllArgsConstructor;
import lombok.Data;

<<<<<<< HEAD
=======
import java.util.ArrayList;
import java.util.List;
>>>>>>> origin/master

@Data
@AllArgsConstructor
public class Student implements Comparable<Student> {
    private String name;
    private int age;

    @Override
    public int compareTo(Student o) {
        //正序排序
        return this.age - o.getAge();

    }

}
